使用注意一下几点:<br>
<OL>
	<LI>selected 属性 : index(索引,必填)  defalut(默认值,可选)
	<LI>array(a,b,c) : a(上级下拉的值域,b当前级下拉的值域,c当前级下拉值域对应的显示的字符串)
	<LI>调用方法:
		<pre>
        var loarbar = new bsteel_associate_list(
            new Array(                                       <----下拉关联属性
                new Array("ff.a",a_array),                   <----new Array("表单属性名",数组)
                new Array("ff.b",b_array),
                new Array("ff.c",c_array)
            ),
            3,                                                <----数量
			'请选择'	                                          <----第一条选择的option的
        );
		</pre>
	<LI>
	<LI>
</OL>
<form method=post action="" name="ff">
	<select name="a" index="0" ></select>
	<select name="b" index="0"></select>
	<select name="c" index="0"></select>
	<hr>
	<select name="a" index="1" defalut="1"></select>
	<select name="b" index="1" defalut="12"></select>
	<select name="c" index="1" defalut="121"></select>
	<hr>
	<select name="a" index="2" ></select>
	<select name="b" index="2"></select>
	<select name="c" index="2"></select>
	<hr>
</form>
<script language="javascript">
<!--


	a_array = new Array(new Array("","1","[1]"),new Array("","2","[2]"));
	b_array = new Array(new Array("1","11","[11]"),new Array("1","12","[12]"),new Array("2","21","[21]"),new Array("2","22","[22]"));
	c_array = new Array(new Array("11","111","[111]"),new Array("11","112","[112]"),new Array("12","121","[121]"),new Array("12","122","[122]"));



 	var loarbar = new bsteel_associate_list(
		new Array(
			new Array("ff.a",a_array),
			new Array("ff.b",b_array),
			new Array("ff.c",c_array)
		),
		3,
		'请选择'
	);
	loarbar.init();
 

	    /**
     *  作者: 陈市明
     *  作用：无限级关联下拉菜单
     *  用法：

 
     */
	function bsteel_associate_list(lists,count,firstStr){
		this.count = count;
		this.init = onload_associate_list;
		this.onchange_associate_list = onchange_associate_list;
		this.remove_list_option = remove_list_option;
		this.update_input_name = update_input_name;
		this.static_associate_list = lists;
		this.count = count;
		this.firstStr = firstStr;

	}

	function update_input_name(obj){
		if(obj.index!="undefined"){
			return obj.name+"["+obj.index+"]";
		}else{
			return obj.name;
		}
	}


	function onload_associate_list(){
		var i,j;
		var x,y;

		for(x=0,y=this.count;x<y;x++){
			for(i=0,j=this.static_associate_list.length;i<j;i++){				
				eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).options.add(new Option(this.firstStr,""));
				
			}

		}		

		//初始化所有的表单 的 全局变量
		
		for(x=0,y=this.count;x<y;x++){
			for(i=0,j=this.static_associate_list.length;i<j;i++){	
				eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).setAttribute("static_associate_list",this.static_associate_list);
				eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).setAttribute("static_associate_count",this.count);
				eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).setAttribute("firstStr",this.firstStr);
			}
		}


		//初始化所有的表单 的 数据
		var a_array = this.static_associate_list[0][1];

		for(x=0,y=this.count;x<y;x++){
			for(i=0,j=a_array.length;i<j;i++){
				eval(this.static_associate_list[0][0]+update_list_index(x,this.count)).options.add(new Option(a_array[i][2],a_array[i][1]));
			}
		}	


		//初始化所有的表单 添加 onchange 触发动作
		for(x=0,y=this.count;x<y;x++){
			for(i=0,j=this.static_associate_list.length-1;i<j;i++){		
				eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).onchange = onchange_associate_list;
			}
		}	

		//初始化所有的表单 的 默认值
		
		for(x=0,y=this.count;x<y;x++){
			for(i=0,j=this.static_associate_list.length-1;i<j;i++){	
 					eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).value = eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).defalut;
					eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).onchange();
					//在没有默认值的情况下,选择第一列:请选择
					if(eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).selectedIndex<=0){
						eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).selectedIndex = 0;
					}				
 			}

 				eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).value = eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).defalut;
				//在没有默认值的情况下,选择第一列:请选择
				if(eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).selectedIndex<=0){
					eval(this.static_associate_list[i][0]+update_list_index(x,this.count)).selectedIndex = 0;
				}
 		}




	}

	function onchange_associate_list(){
		remove_list_option(this);
		var nextObj;
		var array;
		var i,j;
		for(i=0,j=this.static_associate_list.length;i<j;i++){	
			if((this.form.name+"."+this.name)==this.static_associate_list[i][0]){					
				nextObj = eval(this.static_associate_list[i+1][0]+update_list_index(this.index,this.static_associate_count));
				array = this.static_associate_list[i+1][1];
				break;
			}
		}

		//nextObj.options.add(new Option("请选择",""));
		for(i=0,j=array.length;i<j;i++){
			if(this.value==array[i][0]){
				nextObj.options.add(new Option(array[i][2],array[i][1]));
			}
		}

		//如果 只有1条记录可以选择 则默认选择
		if(nextObj.options.length==2){
			nextObj.selectedIndex = 1;
		}


 
	}

	function remove_list_option(currentObj){	
		var remove_flag = false;
		var i,j;
		for(i=0,j=currentObj.static_associate_list.length;i<j;i++){			
			if(remove_flag){
				remove_list_all_option(eval(currentObj.static_associate_list[i][0]+update_list_index(currentObj.index,currentObj.static_associate_count)));
				remove_flag = true;
			}
			if((currentObj.form.name+"."+currentObj.name)==currentObj.static_associate_list[i][0]){
				remove_flag = true;
			}
		}
	}
	
	function remove_list_all_option(listObj){	
		var i,j;
		for(i=0,j=listObj.length;i<j;i++){
			listObj.options.remove(0);
		}
		listObj.options.add(new Option(listObj.firstStr,""));
	}
	
	function update_list_index(index,count){
		if(index=="undefined" || count=="undefined" || count+""=="1"){
			return "";
		}else{
			return "["+index+"]";
		}
	}
</script>